<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var str = "?key=你&age=18&name=lisi";
        var newarr = str.slice(1).split("&");
        console.log(newarr);
        var res = newarr.map(function(item){
            var obj = {};
            var list = item.split("=")
            obj[list[0]] = list[1];
            return obj
        })
        console.log(res)
    </script>
</body>
</html>